<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>邮件发送日志管理</title>
<script>
var baseUrl = "<?php echo $this->baseUrl;?>";
</script>
<link href="<?php echo $this->baseUrl;?>/admincss/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/admincss/thickbox.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/adminjs/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/meetcp.js" /></script>
</head>
<body>
<form id="form1" name="form1" method="post" enctype="multipart/form-data" action="">
E-Mail:
<input name="email" type="text" id="email" size="50" value="<?php echo $this->email;?>" />
<input type="submit" name="button_submit" id="button_submit" value="搜索" class="btn_submit"/>
</form>
    
    
<table class="tableA" width="100%" border="1">
  <tr>
    <td width="5%" nowrap="nowrap">编号</td>
    <td width="12%" nowrap="nowrap">查看</td>
    <td width="5%" nowrap="nowrap">类型</td>
    <td width="14%" nowrap="nowrap">返回值</td>
    <td width="6%" nowrap="nowrap">收件人</td>
    <td width="13%" nowrap="nowrap">标题</td>
    <td width="15%" nowrap="nowrap">发送时间</td>
  </tr>
<?php
$ext = '&mid=' . $this->mid;
$ext .= '&email=' . urlencode($this->email);
	
foreach ($this->list as $v){
$surl=$this->url($this->baseUrl, 'maillog', 'show', 'mid=' . $this->mid . '&id='.$v['id']);
$use = $v['uid'] ==0?"未使用":"已注册";

if ($v['message'] == 'ok'){
	$v['message'] = '<font color="green">ok</font>';
}else{
	$v['message'] = '<font color="red">'.$v['message'].'</font>';
}
print <<<EOT
  <tr>
    <td nowrap="nowrap">{$v['id']}</td>
    <td><a href="{$surl}" target="_blank">查看</a> </td>
    <td nowrap="nowrap">{$v['type']}</td>
    <td nowrap="nowrap">{$v['message']}</td>
    <td nowrap="nowrap">{$v['toemail']}</td>
    <td nowrap="nowrap">{$v['title']}</td>
    <td nowrap="nowrap">{$v['sendtime']}</td>
  </tr>
EOT;
}
$indexurl =$this->url($this->fullUrl, 'maillog', 'search', 'nowp=1' . $ext);
$nexturl = $this->url($this->fullUrl, 'maillog', 'search', 'nowp='.$this->page['next'] . $ext);
$preurl = $this->url($this->fullUrl, 'maillog', 'search', 'nowp='.$this->page['previous'] . $ext);
$lasturl = $this->url($this->fullUrl, 'maillog', 'search', 'nowp='.$this->page['totalpage'] . $ext);
print <<<EOT
  <tr>
    <td colspan="8">共{$this->page['totalnum']}个记录 {$this->page['nowp']}/{$this->page ['totalpage']}
<a href="{$indexurl}">首页</a>
<a href="{$nexturl}">下一页</a>
<a href="{$preurl}">前一页</a>
<a href="{$lasturl}">末页</a>		
</td>
  </tr>
<!--
EOT;
?>
</table>
</body>
</html>
